/**
* Copyright @ 2023 iAuto (Shanghai) Co., Ltd.
* All Rights Reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are NOT permitted except as agreed by
* iAuto (Shanghai) Co., Ltd.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/



import React, { FC } from 'react';
import styles from './index.less';

// interface BaseButtonProps {
//   typeColor?: string;
//   isDisabled?: boolean;
// }

// type NativeButtonProps = BaseButtonProps & ButtonHTMLAttributes<HTMLElement>;
// type AnchorButtonProps = BaseButtonProps & AnchorHTMLAttributes<HTMLElement>;
// export type ShButtonProps = Partial<NativeButtonProps & AnchorButtonProps>;

const ShButton: FC<any> = ({ children, typeColor, isDisabled, ...restProps }) => {
  return (
    <span className={styles.btn}>
      <button
        className={typeColor === 'grey' ? styles.sh_grey : styles.sh_blue}
        disabled={isDisabled}
        {...restProps}
      >
        <i className={styles.dian} />
        {children}
      </button>
    </span>
  );
};

ShButton.defaultProps = {
  isDisabled: false,
};

export default ShButton;
